class Document < ActiveRecord::Base
  attr_accessible :description, :title ,:attachment, :status
  has_attached_file :attachment,
  :url => "/system/:class/:attachment/:id/:style/:basename.:extension",
  :path => ":rails_root/public/system/:class/:attachment/:id/:style/:basename.:extension"
  
  has_many :clients, :through => :client_documents
  has_many :client_documents
  has_and_belongs_to_many :cases
 validates_presence_of :title
validates_attachment_presence  :attachment

 

 
end
